package com.cloud.business.exception;

import com.cloud.business.enums.ResponseEnum;
import lombok.Data;

/**
 * @description : Feign异常
 */
@Data
public class FeignException extends RuntimeException{

    private Integer code;

    public FeignException(){}

    public FeignException(String message){
        super(message);
    }

    public FeignException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public FeignException(ResponseEnum exception) {
        super(exception.getMessage());
        this.code = exception.getCode();
    }
}
